From: Jonathan Lebon Date: Thu, 13 Apr 2023 21:22:41 +0000 (-0400) Subject: lib/sysroot-cleanup: Make bootfs cleanup function global X-Git-Tag: archive/raspbian/2023.7-3+rpi1~1^2~9^2~2^2~8^2~1 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=a0681cd20190d96311738e50334426f218d96214;p=ostree.git lib/sysroot-cleanup: Make bootfs cleanup function global Prep for future patch. --- diff --git a/src/libostree/ostree-sysroot-cleanup.c b/src/libostree/ostree-sysroot-cleanup.c index 2fc2ffb4..533a4fdd 100644 --- a/src/libostree/ostree-sysroot-cleanup.c +++ b/src/libostree/ostree-sysroot-cleanup.c @@ -292,10 +292,10 @@ cleanup_old_deployments (OstreeSysroot *self, /* This function deletes any files in the bootfs unreferenced by the active * bootloader configuration. */ -static gboolean -cleanup_bootfs (OstreeSysroot *self, - GCancellable *cancellable, - GError **error) +gboolean +_ostree_sysroot_cleanup_bootfs (OstreeSysroot *self, + GCancellable *cancellable, + GError **error) { /* Load all active bootcsums and overlays referenced by bootloader configuration. */ g_autoptr(GHashTable) active_boot_checksums = @@ -572,7 +572,7 @@ _ostree_sysroot_cleanup_internal (OstreeSysroot *self, if (!cleanup_old_deployments (self, cancellable, error)) return glnx_prefix_error (error, "Cleaning deployments"); - if (!cleanup_bootfs (self, cancellable, error)) + if (!_ostree_sysroot_cleanup_bootfs (self, cancellable, error)) return glnx_prefix_error (error, "Cleaning bootfs"); OstreeRepo *repo = ostree_sysroot_repo (self); diff --git a/src/libostree/ostree-sysroot-private.h b/src/libostree/ostree-sysroot-private.h index dfa649cb..57ac6824 100644 --- a/src/libostree/ostree-sysroot-private.h +++ b/src/libostree/ostree-sysroot-private.h @@ -187,6 +187,11 @@ gboolean _ostree_sysroot_cleanup_internal (OstreeSysroot *sysroot, GCancellable *cancellable, GError **error); +gboolean +_ostree_sysroot_cleanup_bootfs (OstreeSysroot *self, + GCancellable *cancellable, + GError **error); + gboolean _ostree_sysroot_parse_bootdir_name (const char *name, char **out_osname, char **out_csum);